import request from '@/utils/request'

// 能耗批量分配

// 列表 错误码300071
export function list(params) {
    return request({
        url: '/energy/quota-allocation/list',
        method: 'get',
        params
    })
}

// 额度分配 错误码300072
export function quotaAllocation(data) {
    return request({
        url: '/energy/quota-allocation/quotaAllocation',
        method: 'post',
        data
    })
}

// 检查能否反馈 错误码300073
export function checkCommitEnable(params) {
    return request({
        url: '/energy/quota-allocation-opinion/checkCommitEnable',
        method: 'get',
        params
    })
}

// 反馈 错误码300074
export function quotaAllocationOpinion(data) {
    return request({
        url: '/energy/quota-allocation-opinion/opinion',
        method: 'post',
        data
    })
}

// 调整额度 错误码300075
export function adjustVal(data) {
    return request({
        url: '/energy/quota-allocation/adjustVal',
        method: 'put',
        data
    })
}

// 用能单位total 错误码300076
export function totalEnergy(params) {
    return request({
        url: '/energy/quota-allocation/energy',
        method: 'get',
        params
    })
}

// 详情 错误码300077
export function detail(id) {
    return request({
        url: `/energy/quota-allocation/detail/${id}`,
        method: 'get',
    })
}
